﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.Practices.Unity;
using Sigavat.Entities;
using Sigavat.Repository;

namespace Sigavat.Service
{
    public class PromotorService : IPromotorService
    {
        [Dependency]
        public IPromotorRepository promotorRepository { get; set; }
        public List<Promotor> GetAllFromPromotores()
        {
            return promotorRepository.GetAllFromPromotores();
        }

        public List<Promotor> GetFromPromotoresByCriterio(string criterio)
        {
            return promotorRepository.GetFromPromotoresByCriterio(criterio);
        }

        public Promotor GetFromPromotorBy(int id)
        {
            return promotorRepository.GetFromPromotorBy(id);
        }

        public void AddPromotor(Promotor promotor)
        {
            promotorRepository.AddPromotor(promotor);
        }

        public void UpdatePromotor(Promotor promotor)
        {
            promotorRepository.UpdatePromotor(promotor);
        }

        public void RemovePromotor(int id)
        {
            promotorRepository.RemovePromotor(id);
        }
    }
}
